package com.xinqi.modules.homework.homework.controller.html;

import com.xinqi.modules.homework.homework.dto.rsp.CourseHomeworkFileResultDTO;
import com.xinqi.modules.homework.homework.service.CourseHomeworkFileService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 作业学生提交文件APP接口
 *
 * @author: system
 * @date: 2023/03/08
 */
@Controller
@RequestMapping("/app/homework-file")
@RequiredArgsConstructor
public class CourseHomeworkFileHtmlController {

    private final CourseHomeworkFileService courseHomeworkFileService;

    /**
     * 标注查看-H5页面
     *
     * @Author dzy
     * @Date 10:10 2023/3/9 0009
     * @Return
     */
    @GetMapping("/scan-mark/{id}")
    public String scanMark(@PathVariable("id") Long id, ModelMap mmap) {
        CourseHomeworkFileResultDTO file = courseHomeworkFileService.findById(id);
        mmap.put("file", file);
        return "taskMark/index";
    }

}
